@import url("../static/css/bootstrap.min.css");

.row .x-sizes {
    margin-right: 20px;
}

.row .x-colors {
    margin-right: 20px;
}
#codeSource {
    height: 100px;
}
canvas {
    border: 1px solid #ddd;
    padding: 10px;
}
.x-logo {
    position: absolute;
    left: -10000px;
    top:-10000px;
}
hr.x-hr  {
    margin: 2px 0;
}
#preview {
    padding: 5px;
    text-align: center;
}
.panel-heading .x-tips {
    font-size:12px;
    float: right;
    padding-bottom: 2px;
    border-bottom: 1px solid #ccc;
    cursor: default;
}
.panel-heading .x-tips:hover {
    border-bottom-color: #f00;
}
.panel-heading .x-tips i {
    color: #f00;
}
#_creset {
    font-size:12px;
}

.tips{
    color: #666;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.6;
}

table {
    width:100%;
    table-layout: fixed;
}
td {
    width:50%;
    vertical-align: top;
}

/* 现代化的内容区域样式 */
.panel-body.mod-json {
    padding: 30px;
    background-color: #ffffff;
}

/* 输入区域样式 */
.mod-textarea, #codeSource {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    background: #fafafa;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.mod-textarea:focus, #codeSource:focus {
    background: #ffffff;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
    outline: none;
}

/* 操作区域样式 */
.row.ui-mt-10 {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* 输入框样式 */
#opt_width, #opt_fc {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

#opt_width:focus, #opt_fc:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
    outline: none;
}

/* 单选框组样式 */
.radio label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.radio input[type="radio"] {
    margin-right: 4px;
    position: relative;
    top: -2px;
}

/* Style for the hint text to ensure its alignment */
.hint-text {
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
}

/* If the '图标:' text is outside the label, ensure it's also aligned */
.x-icons {
    display: inline-flex;
    align-items: center;
}

/* 生成按钮样式 */
.btn-success {
    background: #4a90e2;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(74,144,226,0.2);
}

.btn-success:hover {
    background: #357abd;
    box-shadow: 0 4px 8px rgba(74,144,226,0.3);
    transform: translateY(-1px);
}

/* 结果预览区域 */
#preview {
    margin-top: 25px;
    padding: 25px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 解码模式样式 */
td .x-panel {
    height: 460px;
    background: #ffffff;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-right: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

td .x-panel:hover {
    border-color: #4a90e2;
    background: #f8f9fa;
}

td .x-panel .x-tips {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

#upload {
    background: #4a90e2;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(74,144,226,0.2);
}

#upload:hover {
    background: #357abd;
    box-shadow: 0 4px 8px rgba(74,144,226,0.3);
    transform: translateY(-1px);
}

#decodePreview {
    max-width: 100%;
    max-height: 300px;
    margin: 15px 0;
    border-radius: 4px;
    object-fit: contain;
}

#decodeResult {
    height: 460px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    transition: all 0.3s ease;
}

#decodeResult:focus {
    background: #ffffff;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
    outline: none;
}

/* 保持原有的顶部导航样式 */
.x-switch {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    cursor: pointer;
    text-decoration: none;
    border: none;
    margin-left: 70px;
    white-space: nowrap;
    margin-right: auto;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #eff6ff;
    transition: all 0.2s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.x-switch::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    background: url('../static/img/switch-mode.svg') no-repeat center center;
    background-size: contain;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.x-switch:hover,.x-donate-link:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

.x-switch:hover::before {
    transform: rotate(180deg);
    opacity: 1;
}
.x-donate-link {
    margin: 0 10px;
    font-size: 12px;
    font-weight: normal;
}

form {
    display: none;
}

/* 三栏布局样式 */
.qr-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
}

.qr-left, .qr-center, .qr-right {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qr-left {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.qr-center {
    flex: 1;
}

.qr-right {
    flex: 1.5;
    background-color: #f8f9fa;
}

.section-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    background-color: #e9ecef;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-action:hover {
    background-color: #ced4da;
    color: #212529;
}

/* Style for successful copy */
.btn-action-success {
    background-color: #28a745 !important; /* Green background */
    color: #fff !important; /* White text */
}

/* 控制面板样式 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-item label {
    min-width: 50px;
    color: #666;
}

/* 输入框样式优化 */
.mod-textarea {
    flex: 1;
    min-height: 200px;
    margin: 0;
    resize: none;
}

/* 输入框样式 */
#opt_width, #opt_fc {
    flex: 1;
    max-width: 120px;
    height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

/* 按钮容器样式 */
.control-item:last-child {
    margin-top: 20px;
    justify-content: center;
}

/* 预览区域样式 */
#preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 260px;
    background: #fafafa;
    border-radius: 6px;
    padding: 20px;
}

/* 确保图标选择区域样式正确 */
.x-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.radio label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hint-text {
    color: #666;
    font-size: 12px;
    margin-left: 8px;
}

/* 解码器布局样式 */
.qr-decoder-layout {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
}

.decoder-left, .decoder-right {
    flex: 1;
    background: #f8f9fa; /* Consistent background */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.decoder-right {
     background: #fff; /* Keep right panel white or match left */
}

/* 上传面板样式 */
.upload-panel {
    flex: 1;
    min-height: 300px;
    background: #fff;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.upload-panel:hover {
    border-color: #4a90e2;
    background: #fdfdfd;
}

.upload-instructions {
    margin-top: 20px;
}

.drag-drop-text {
    display: block;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 上传按钮 (#upload) 使用之前的现代样式 */
#upload {
    background: #4a90e2;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 15px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(74,144,226,0.2);
    border: none;
    display: inline-block;
    cursor: pointer;
}
#upload:hover {
    background: #357abd;
    box-shadow: 0 4px 8px rgba(74,144,226,0.3);
    transform: translateY(-1px);
}

/* 预览图片样式 */
#decodePreview {
    max-width: 100%;
    max-height: 250px;
    margin-bottom: 15px;
    border-radius: 4px;
    object-fit: contain;
}

/* 解码结果文本域 (#decodeResult) 使用之前的 .mod-textarea 样式 */
#decodeResult {
    flex: 1;
    /* Inherits styles from .mod-textarea */
    min-height: 300px; /* Ensure it takes available space */
    margin: 0; /* Reset margin */
}

/* 解码提示文字样式 */
.decoder-tips {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.decoder-tips i {
    font-style: normal;
    color: #333;
    font-weight: 500;
}

/* --- Top Navigation Bar --- */
.panel-heading {
    padding: 10px 20px 2px; /* Increased padding for more space */
    background-color: #ffffff; /* Keep white or use a very light grey like #f8f9fa */
    border-bottom: 1px solid #dee2e6; /* Lighter, softer border color */
}

.panel-title {
    font-size: 16px;
    font-weight: 600; /* Slightly bolder title */
    display: flex;
    align-items: center;
    color: #212529; /* Darker text color */
}

.title-text-wrapper {
    display: inline-block;
    white-space: nowrap;
}

.panel-title .x-a-high {
    color: #212529; /* Match title color */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 600; /* Match title weight */
}

.panel-title .x-a-high img {
    vertical-align: middle;
    margin-right: 6px; /* Slightly more space */
    height: 18px;
}

/* Style for the mode switch button */
.x-switch {
    position: relative;
    top: -3px;
    font-size: 13px;
    color: #007bff; /* Standard blue */
    cursor: pointer;
    text-decoration: none;
    border-bottom: none;
    font-weight: 500;
    margin-left: 70px;
    white-space: nowrap;
    margin-right: auto;
    padding: 4px 8px; /* Add some padding */
    border-radius: 4px; /* Rounded corners */
    transition: background-color 0.2s ease, color 0.2s ease; /* Smooth transition */
}

.x-switch:hover {
    background-color: #e9ecef; /* Subtle background on hover */
    color: #0056b3; /* Darker blue on hover */
    text-decoration: none; /* Remove underline on hover */
}

.title-text-wrapper-text {
    margin-left: 10px;
    position: relative;
    top: -4px;
    font-weight: normal;
}